<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>增加新员工</title>
<script type="text/javascript" src="js/datepicker/WdatePicker.js"></script>
<script type="text/javascript" src="js/jquery-1.2.6.js"></script>

<link href="style/main.css" rel="stylesheet" type="text/css"/>
<link href="style/glowtabs.css" rel="stylesheet" type="text/css" />
</head>

<body class="body_content">
<div id="wrap">
	<div id="main" class="clearfix">
	
<jsp:include page="../header.jsp"></jsp:include>

<div class="ricoh_content_k">
	<div class="ricoh_title">--- 增加新员工 --- </div>
	<div class="ricoh_content_in">
	
	<form action="member_saveNewEmployee.action" method="post" onsubmit="return validation();">
		<dl>
			<dt>姓名:</dt><dd>
			  <input type="text" id="name" name="person.name" maxlength="5"/>
			</dd>
			<dt>性别:</dt><dd>
			  <input type="radio" name="person.gender" value="1" checked="checked"/>男
			  <input type="radio" name="person.gender" value="2" />女
			</dd>
			<dt>出生日期:</dt><dd>
			  <input name="birthday" type="text" id="birthday" class="Wdate" onclick="WdatePicker()" readonly="readonly" size="21"
					onfocus="WdatePicker({dateFmt:'yyyy-MM-dd',alwaysUseStartDate:true})"></input>
			  
			</dd>
			
			<!--  
			<dt>民族:</dt><dd>
			  <select name="select4">
			    <option selected="selected">汉族</option>
			    <option>蒙古族</option>
              </select>
			</dd>
			-->
			
			<dt>联系方式:</dt><dd>
			  <input type="text" id="contactWay" name="person.contactWay" maxlength="20"/>
			</dd>
			<dt>家庭住址:</dt><dd>
			  <input type="text" id="homeAddress" name="person.homeAddress" style="width:300px" maxlength="50"/>
			</dd>
			
			<!--  
			<dt>工作号:</dt><dd>
			  <select name="select5">
			    <option>GH0000001</option>
			    <option>GH0000002</option>
                            </select>
			</dd>
			
			注:增加新员工时,员工状态卫在职
			<dt>员工状态:</dt><dd>
			  <select name="select6">
			    <option>在职</option>
			    <option>离职</option>
              </select>
			</dd>
			-->
			<!--  
			<dt>登录名:</dt><dd>
			  <input type="text" name="textfield4" />
			</dd>
			<dt>登录密码:</dt><dd>
			  <input type="text" name="textfield5" />
			</dd>
			-->
			
			<dt>类别:</dt><dd>
			  <select name="person.category">
			    <option value="2">维修员</option>
			    <option value="1">销售员</option>
			    <option value="0">管理员</option>
              </select>
			</dd>
			
			<!--
			<dt>是否是管理员:</dt>
			<dd>
			  <select name="select8">
			    <option>是</option>
			    <option>否</option>
              </select>
			</dd>
			-->
			
			<dt>入职时间:</dt><dd>
			  <input name="beginTime" type="text" id="beginTime" class="Wdate" onclick="WdatePicker()" readonly="readonly" size="21"
					onfocus="WdatePicker({dateFmt:'yyyy-MM-dd',alwaysUseStartDate:true})"></input>
			</dd>
			<dt>&nbsp;</dt><dd>
			  <input type="submit" value="确定"  class="send_btn"/>
			</dd>
			<div class="clear"></div>
		</dl>
	</form>
		
  </div>
</div>

</div>
</div>

<jsp:include page="../footer.jsp"></jsp:include>

</body>
<script type="text/javascript" src="js/ddtabmenu.js"></script>
<script type="text/javascript">
	ddtabmenu.definemenu("ddtabs2", 1);

	$(document).ready(function(){
		
		if(${statusTemp} == true){
			alert("添加成功");
		}
	});

	function validation(){
		if($("#name").val() == ""){
			alert("请输入员工姓名");
			return false;
		}else if($("#birthday").val() == ""){
			alert("请选择员工生日");
			return false;
		}else if($("#contactWay").val() == ""){
			alert("请填写员工联系方式");
			return false;
		}else if($("#homeAddress").val() == ""){
			alert("请填写员工家庭住址");
			return false;
		}else if($("#beginTime").val() == ""){
			alert("请选择员工入职时间");
			return false;
		}else{
			return true;
		}
	}
</script>


</html>
